The present invention relates generally to computer systems and, more particularly, to methods and hardware for protecting dynamically allocated memory address space from inadvertent overwrite or other modification.
In the dynamic recompilation of programs, new code allocation in the address space of the program that is the subject of the dynamic recompilation raises a potential problem. If the original program obeys the system application binary interface (ABI), then the allocation of new code via system request cannot collide with the addresses allocated for the original program. On the other hand, if the original program is arbitrary and does not obey the system ABI, then the allocation of new code via system request may collide with the addresses allocated for the original program. Accordingly, there may be situations where the system or other code will inadvertently overwrite data for optimized code written to certain memory address spaces. When this happens, the optimized code will fail during execution, and the cause of its failure may not necessarily be evident upon first examination. Consequently, such failures can introduce unexpected increases in development costs to research and diagnose the cause of the failure.
In view of the foregoing, there is a need for a method for the safe allocation of memory address space in arbitrary program environments that reliably avoids collisions with addresses allocated for the original program.